[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Dreaming

Peter

10/14/2003 4:39:00 PM

Dreaming about a day when:
I can use '{' '}' instead of begin ... end, def \n ... end, etc.
more similar to c++
Space as an array delimiter eliminated,
and using plenty of spaces before argument parentheses.
Last but not least: implemented in c++ in a way that the source
can be dumped as c++ code including the ruby headers for
collections ... (whatever needed, smt like C++ STL)

Is that possible | long away ? :)

Anyway thanks for a wonderfull language

2 Answers

Aleksei Guzev

10/15/2003 4:17:00 AM

0

On Tue, 14 Oct 2003 16:38:33 GMT, Voltaire <no_spam@no.where> wrote:

> Dreaming about a day when:
> I can use '{' '}' instead of begin ... end, def \n ... end, etc.
> more similar to c++
> Space as an array delimiter eliminated,
> and using plenty of spaces before argument parentheses.
> Last but not least: implemented in c++ in a way that the source
> can be dumped as c++ code including the ruby headers for
> collections ... (whatever needed, smt like C++ STL)
>
> Is that possible | long away ? :)
>
> Anyway thanks for a wonderfull language
>

Readable code would be nice. Code docs, structures, typedefs for strings,
chars, bytes would allow better optimization and easier porting. But Matz
does not want to do this :( It's to his own decision, because we (at least
me) do not pay to him for the perfect language. If someone will rewrite
the code in C++ how can one apply updates and patches from the cvs?

Aleksei Guzev

Robert Klemme

10/15/2003 8:09:00 AM

0


"Voltaire" <no_spam@no.where> schrieb im Newsbeitrag
news:dEVib.35131$vO5.1316063@twister1.libero.it...
> Dreaming about a day when:
> I can use '{' '}' instead of begin ... end,

"begin ... end" is much more readable in cases like this, which are all
too common:

begin
# do stuff
rescue
# oops, error
ensure
# cleanup
end

This does not fit well into the { ... } scheme.

> def \n ... end, etc.

Hey, that's just six keystrokes that you want to reduce to two. Is that
worth the effort?

> more similar to c++

Why should that be a good thing? I always found that Ruby's syntax is
nice and easy to learn.

> Space as an array delimiter eliminated,

Don't know what exactly you mean by this.

> and using plenty of spaces before argument parentheses.

This was deliberately changed in 1.8 to reduce ambiguities like

puts foo bar

See the other threads about the topic.

> Last but not least: implemented in c++ in a way that the source
> can be dumped as c++ code including the ruby headers for
> collections ... (whatever needed, smt like C++ STL)

You mean, you want to compile Ruby code into C++ code? IMHO that's asking
for much especially since C++ is less portable than C.

> Is that possible | long away ? :)

Both. :-)

> Anyway thanks for a wonderfull language

Yeah, *that's* true!

Kind regards

robert