News for hackers. Stuff that matters.
Re:Python with Braces by vezzy-fnord on Sunday February 09, 2014 @05:59PM (#7207797)
Even then, this seems like a lot of work to overcome a non-problem, akin to developing a C++11 compiler which uses "begin" and "end" instead of braces because of some emotional attachment to Pascal.

The thing is, it's actually trivial to do that using the C++ preprocessor.

In fact, Steve Bourne wrote the Bourne shell exactly in this fashion, with the following C substitution macros (based on Algol-68):

    #define STRING char *
    #define IF if(
    #define THEN ){
    #define ELSE } else {
    #define FI ;}
    #define WHILE while (
    #define DO ({
    #define OD ;}
    #define INT int
    #define BEGIN {
    #define END }
Source: Expert C Programming: Deep C Secrets, p. 13. Peter Van der Linden. 1994.

(this isn't to deny that Python with Braces is a rather frivolous idea)

There are no comments on this comment yet.