Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sounds like a good opportunity to oil up Chesterton’s fence. You may want to consider the possibility that the conventions Lispers have been using for considerably longer than C or whatever language you like to bikeshed style guides in has existed were actually settled on for pragmatic reasons.

You’re not alone though. Many nascent Lispers go through the use reader macros to make Lisp look more like what they’re used to phase.



Not just nascent Lispers. I inherited something like this in a C codebase before (several times, actually, only one that I had to actually edit though):

  #define BEGIN {
  #define END }
  #define INTEGER int
  ...
Yes, they even did it with the types. Made for a weird Pasctran language that the dev was apparently more comfortable with. I think they actually got a C translation of another program almost "for free" doing this. The real thing was they didn't want to write new code and didn't want to learn C, so they subjected everyone after them to this horror.

Moral of the story: If you can't be bothered to learn a language and its conventions, be honest and get another job.


Pasctran is an ancient cult. [1] Some say they're extinct. Others say its practitioners have just gone underground, now that society will no longer tolerate such things done in public. It's everywhere once you start looking though, insidiously contaminating our precious function bodies.

From the source to the original Bourne shell:

    BEGIN
       REG BOOL slash; slash=0;
       WHILE !fngchar(*cs)
       DO    IF *cs++==0
        THEN    IF rflg ANDF slash THEN break; ELSE return(0) FI
        ELIF *cs=='/'
        THEN    slash++;
        FI
       OD
    END
[1] https://research.swtch.com/shmacro


As an old Pascal programmer who never really liked C.... even I have to say NO!!!!

What a horrible thing to do. I've never liked macros, and things like this are part of the reason why.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: