Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Ruby with indentation delimiting

Name: Anonymous 2010-12-11 21:21

I prefer Python over Ruby mainly because I like the readability Python's indentation delimiters over Ruby's end delimiters. However indentation delimiting has a major disadvantage, its more difficult to move code around and you cant use auto-indent scripts like Perl's perltidy or C++'s indent. But I have an idea to get the best of both worlds, and that is to use the editors search and replace feature to replace Ruby's end delimiters with an invisible character that never gets used such as the bell character. The Ruby file would always be saved with end delimiters, but a search and replace script would switch the source code in the editor back and forth between end and an invisible character. So by appearances it would look as though indentation delimiting was being used. But at any time you could add code to complicated code structures with an end delimiter and have the autoindent script reindent everything.

Name: sage 2010-12-11 22:36

sage

Name: Anonymous 2010-12-13 13:28

THIS IS AN AWESOME IDEA

Name: Anonymous 2010-12-13 13:31

THIS IS AN AWESOME SAGE

Name: Anonymous 2010-12-13 13:32

Newlines considered harmful.

Name: Anonymous 2010-12-13 16:27

Considerations considered harmful.

Name: Anonymous 2010-12-13 16:33

Considering considerations harmful considered harmful.

Name: Anonymous 2010-12-14 4:53

``Considered Harmful'' Thread Replies Considered Harmful

Name: Anonymous 2010-12-14 5:03

``Tex quotes'' considered for faggots.

Name: Anonymous 2011-02-03 8:05

Name: Anonymous 2011-02-04 16:30

Don't change these.
Name: Email:
Entire Thread Thread List