번역서 정보 | 문서 창고 | 자유 게시판 | 방명록

간단한(?) 번역 문제 하나.

류광, 2005/03/14 20:21
C++ Template Meatprogramming 7 장에 나오는 코드 한 조각....

template<class Seq, class MinSize> 
struct padded_size 
  : mpl::sizeof_<                 // the size of 
     typename mpl::deref<         // the element at 
       typename mpl::lower_bound< // the first position 
         Seq 
         , MinSize 
         , comparison predicate   // satisfying... 
       >::type 
     >::type 
   > 
{};

각 주석들을 위에서 아래로 이으면 'the size of - the element at - the first position - satisfying...' 입니다. 그리고 의사 코드인 "comparison predicate"를 ... 에 끼워 넣으면
the size of the element at the first position satisfying (this)comparison predicate 라는 하나의 명사구가 됩니다.

주석 조각들은 영어의 어순을 따라, 그리고 코드의 의미와 일치하는 형태로 배치되어 있습니다. 주석들을 그대로 번역하면 한국어 어순과 맞지 않고, 한국어 어순에 맞게 배치하면 코드와의 일치 관계가 깨집니다. 이런 건 어떻게 처리해야 좋을까요...

제가 택한 해법...



사실 이런 어순의 차이는 극복하기가 힘듭니다. 역주로 때우는 게 속도 편하고, 다른 어떤 교묘한 방법보다 덜 명확하지도 않을 것입니다.

해결하기 어려운 문제는 피해가자...라는 취지라고 봐도 되구요 :)
top
TAG ,

Trackback Address :: http://occamsrazr.net/tt/trackback/67

  1. redpixel 2005/03/20 23:33 PERMALINKMODIFY/DELETE REPLY

    template<class Seq, class MinSize>
    struct padded_size
    : mpl::sizeof_< // 크기를 반환해봅시다
    typename mpl::deref< // 크기측정 대상
    typename mpl::lower_bound< // 대상은 첫번째 위치
    Seq
    , MinSize
    , 비교지시자(?) // 이것을 만족하는 것만 꺼내오기
    >::type
    >::type
    >
    {};

    날림으로 적어보자면 이런식인...건가요? 어려워요. Orz...

  2. 류광 2005/03/21 03:04 PERMALINKMODIFY/DELETE REPLY

    그것도 좋네요...

    ^^ 제 해법을 추가했습니다. 속았다~라는 느낌이 드실지도 모르겠습니다....... :)

  3. redpixel 2005/03/23 15:03 PERMALINKMODIFY/DELETE REPLY

    그저 Orz 일뿐입니다. (먼산)

  4. 류광 2005/03/25 17:22 PERMALINKMODIFY/DELETE REPLY

    ^^;;;

  5. 정진혁 2005/05/17 13:45 PERMALINKMODIFY/DELETE REPLY

    //이조건을 만족하는 첫번째 위치의 요소의 크기
    //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;====
    //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;============
    //================

    이런식으로 하면 안될까요?

  6. 류광 2005/05/17 18:45 PERMALINKMODIFY/DELETE REPLY

    예 좋네요.. 더 나아가서 Code Reading의 몇몇 예처럼 조판 차원에서(화살표, 상자 등등) 해결하는 것도 좋을 것 같습니다.

Write a comment