Hey prog!! I am learning C++ and I was wondering how I could extend its syntax. Any C++ experts there want to tell me how? I know C++ is really low level so it should be simple. Thanks!!!
>>9
Making other programmers who read your code cry.
Name:
Anonymous2010-09-17 4:02
I remember there was such compiler, which allowed to extend C++ syntax. What was it called? Tendra? Well anyway, just like with Nemerle, it LOVED to fall to SEGFAULT.
>>17
I don't know what he's trying to pretend to be, but he's failing miserably.
3/10 for managing to troll some random passer-by who accidentally wandered into /prog/.
>>22
While I agree with this, I believe that the "shitty situation" isn't C++ itself, but programming languages in general. The fact that C++ is still the industry standard isn't C++'s fault.
>>24
The modern video game industry is built on C++. They need reusable components written in portable assembler desperately enough to make C++ work. My heart breaks every time I think about it.
>>1
Use Lisp instead.
And I'm not just saying it because we love SICP and cirkle jerks over it but because it's probably the most extendable language... Ever.
Name:
Anonymous2010-09-17 17:49
lulz. maybe you should learn c++ before worrying about 'extending syntax.'
>>36
No, he's telling you that C++ is so powerful that if you knew it well, you wouldn't have any desire to extend its syntax. Many C++ programmers have this delusion.
Although, knowing C++ well will still make you want to stay far away from its syntax train wreck.
>>38 C++ is so powerful that if you knew it well, you wouldn't have any desire to extend its syntax
Reminds me of that bit in the Hitchhiker's series about environment control and not needing to open the windows. It's funny when I read it in a fictional setting, but disturbing when talking about programming.
>>40 Extending syntax isn't as basic as opening windows.
It is in certain *cough* paren-based languages and a few others It's entirely unnecessary in a Turing-complete language.
If that is your argument then we can do away with everything except lambda as Alonzo Church and others have shown. The reason languages include certain features is that they make it more useful and make programs easier to write, not because they are essential to attaining Turing Completeness.