Специализни шаблонца! (udpn) wrote,
Специализни шаблонца!

Screw Scala

Development in C++ seemed OK while I knew nothing about path-dependent types. I've just been writing a parser that would be 10x more simple with PD-types and realized there's no way even to emulate some.

UPD. I've just got terrorized by the fact that I don't even need path-dependent types. There are places where C++ is not type safe through all the sorts of compile-time magic I've put into that program. Java-style child classes would be enough. I don't even see a way child classes are incompatible to "zero overhead" rule. Gosh, there's something in Java that is not disgusting after all.

For all the interested among the readers, here's a description of the use case. Write a PEG-parser combinator language in C++ that is optimized by having primitives implemented via CRTP. Avoid passing end iterator of the parsed range through all the combinators.
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded