-----BEGIN PGP SIGNED MESSAGE----- In article <app0cb$30r$2 / grapevine.wam.umd.edu>, William Djaja Tjokroaminata <billtj / y.glue.umd.edu> wrote: >Nikodemus Siivola <tsiivola / cc.hut.fi> wrote: > >> Using ruby to solve domain specific issues. For example, 3D stuff need a >> lot of matrices and vecotrs. It would be nice to have literal for those, >> now I need to do > >> Vector.new(3,5,6) > >> This can get rather verbose in the long run, defining a literal would allow >> me to do > >> <3,5,6> > >> or whatever. > >> Yes, this would definitely be cool. And useful. I am thinking this is >> somehing that should have a file based scope: you would explicitly have to >> enable the syntax in each file you want to use it in. > >> Perhaps the simples option would be to define '<' ... '>' and some others >> as used bindable lietarals. It would be artificially resticted, but much >> more implementable then a totally general case. > >Hi, > >I think things like this can be implemented by individuals and not forced >into the standard Ruby. For example, I write my own SRuby so that I can >"preprocess" a file written in Python style with the output of a valid >Ruby code. In the same way, if we like "<3, 5, 6>" to be the notation for >a vector, we can simply preprocess it to be "Vector.new(3, 5, 6)". It is >true that the algorithm/grammar/parser can get very complicated, but the >individual can control how complex he/she wants it to be. > - - If you really think this is a good idea, then you will really like Perl6. IMHO, it's the path to madness and the big reason that I've decided that I need to learn a new language. To me there is a significant value in restraint, language design need to strike a balance between flexibility and expression. If you create "per application or per programmer" languages and there is a whole school of CS theory/practice about doing this, I think you destroy much of the open community that developes around a language. - - There is a fundemental difference in philosophy that can't be resolved. IMHO, in the long run computer languages are just as much about communicating with other programmers as about communicating with the machine. One of the reasons we all love Ruby is that it is very readable. While this proposal is well intentioned, anything that compromises the readablity of Ruby has to be looked at very carefully. - - Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBPcLaPmTWTAjn5N/lAQEKHAQAqUW8w1ZkulqGhN/orgQBRfanbCJx8x6+ kIIHLZR1ZDZ4azCoc3MnEndM4Ui2dOSOaqy8Mx/QCVtYiMsTJsaiWN2e+6ge/uiJ htkHJVmQ2WYwUcZ4r1lVVEXxBw8e/K9gayNyMgmCoyri9FrCsWa+KNZQ/OaQL/9n /3aCxHwyEkU= =VGax -----END PGP SIGNATURE-----