World: r4wp
[!REBOL3] General discussion about REBOL 3
older newer | first last |
Geomol 30-May-2013 [2526] | I see your point, but it just raises some concerns in relation to REBOL. For example, /* is a valid refinement: >> type? /* == refinement! So some might wanna make a shell command in REBOL to be used at the REBOL prompt, that reads /* as all the files in the root directory, like LS /* That will not be possible, if /* is part of a comment. |
Oldes 30-May-2013 [2527] | what about this char: ~ add ~first ~ 1 ~second~ 2 |
GiuseppeC 30-May-2013 [2528] | Geomol, "/* */" is just an example we can use any combinatio which is not so difficult to type :-) (/* */ It come from AREXX ... oh, memories !) |
Geomol 30-May-2013 [2529] | Tilde is an option. There are three function in REBOL using that char, the function variations of and, or and xor. I call those and', or' and xor' in World, so that's a possibility in R3, if people wants. And then tilde can be used in URLs, like: >> type? url://~a == url! I can't judge, if that's a problem, if tilde should be used for comments too. |
Gregg 30-May-2013 [2530] | I don't think REBOL should support it Giuseppe, but you can write a dialect that does. Carl mentioned at one point that he considered allowing "filler" words, but decided against it. I sometimes allow them in my dialects. |
GiuseppeC 30-May-2013 [2531x2] | Gregg, in my scenario I propose filler "comments" and not words. This should not change REBOL language but only commenting. The Editor will be in charge for diplaing these comments in different colors. Adding filler words should be a major change in REBOL. I don't wont to propose something so big. |
Oldes, In my keyboard (italian) there is no tilde key. The only available characters are | (but I ithink it is already use in REBOL. and ^ Another proposal would be to have ";" as alternate ending for the comment other than CR In this way we can have for ;(set); myvar ;starting from; 1 ;reach; 10 ;use the stepping; 2 ;and execute; [print myvar] ;standard comment with stops at the end of line | |
Gregg 30-May-2013 [2533] | Filler values of any kind change REBOL. If you really want to do that, experiment by using tags as comments, strip all tags after loading your code, then DO it. Now see if if really helps people when they use your simple dialect. Can the same be acheived, roughly, with reformatting and end-of-line comments? None of us here can tell you if it is really helpful. It's different, but that doesn't mean better. Using semicolons as an alternate comment end mark is a HUGE change, and not for the better IMO. |
Oldes 31-May-2013 [2534] | Yes, the tilda used in urls is a showstopper. Personaly I don't think that inline comments are necessary and add some readability. I'm fine with current state. |
Geomol 31-May-2013 [2535x3] | Just thinking crazy thoughts loud again: >> comment { ... } >> ;{ ... } >> |
I know, how and why it works as it does today, but should it be possible to: >> comment { ... } 42 == 42 >> ;{ ... } 42 == 42 ; <--- this doesn't happen today. | |
I can't find a problem in it, but I'm not sure, if I like it. | |
GiuseppeC 31-May-2013 [2538] | Gregg, Oldes, it is a feature for people who like it. Having verbose lines really help understand the language but it is not for all. I think about it for new user and to say to the world "you can write human language resembling lines". I was sure that professional rebolers would not find this useful... but it is not useful for them, for us, it is for another part of the world. |
Geomol 31-May-2013 [2539x6] | Yes, I understand that. But some things may not be good to get used to from the start. Because once you're used to that, would you continue using it? Probably you will. So we'll start seeings scripts with comments inside lines. Would it be easier or harder to maintain such code? Would it be easier or harder for other people to learn from such scripts? I'm not sure. Maybe I could implement it in a version of World alpha, so we can see, how it works in practise. |
Even my example in the #World group with comments inside parentheses together with arguments are ugly to me. I'm wondering, if it's a good thing, that you can do such. :) | |
On the other hand, in human written languages, we use comments all the time (like this extra information here). So (as I said before), I'm not sure. :) | |
Should smileys be allowed in a computer language? :D | |
>> -D: does [exit] >> print 42 :-D 42 I'm rambling! | |
>> -O: does [] >> :-O >> -|: does [] >> :-| >> | |
Gregg 31-May-2013 [2545] | Giuseppe, all I'm saying is to experiment first. Dialects are great for that. I'm not against all verbosity, and was reminded recently by an article I read that we can add value by adding information and structure to our programs. And I think the idea of the editor knowing, and highlighting, filler words is great. At this point, and I'm happy to be convinced otherwise, the standard REBOL interpreter should not handle it. Is REBOL more like math or natural language? Would you implement comments the same way if you said "Math"? |
Ladislav 1-Jun-2013 [2546] | #[[Giuseppe REBOL language differs from other languages because you can write "human resembling" code lines. During the past weeks I have thought about a way to make more understandable the language in a simple way now you can write: mypage: read http://www.rebol.com I whish to write: set the variable mypage: reading from http://www.rebol.com ]]Giuseppe Carl really took some "architectural" principles of Rebol from human laguages making it resemble human languages in that respect. However, he did not want to immitate everything. Sorry, Giuseppe, but I must say that you are missing big what is the main principle of advancement relative to other computer languages. It is dialecting and not the ability to write the primitive and verbose "set the variable mypage: reading from http://www.rebol.com" |
GiuseppeC 1-Jun-2013 [2547x4] | Ladislav, I disagree with your (not so) hidden opinion that the feature I proposed is not useful at all. During my early days and even now I find difficult to uderstand REBOL code without "connectors" words which makes a line more descriptive. I agree that dialecting is a big advancement. I also like the opportinity to write "first, second,... last" but adding ";" should be a big change and you should really walk in the shoes of a newbie where reading a line with connector words really makes the difference. |
I think that presenting a line with connectors would let many new developers say "WOW, I can understand this so I can program using this language". Please note I don't want to say that REBOL will be better for all, that it will be more elegant. It is a cosmetic factor which adds readability to the code. Then, when coders get used to the rebol sintax they will naturally drops inline descriptions. | |
Geomol: "is this a good thing ?" Only time and experience will tell. But I am sure that if I write on the top of a web page a full line of code and the If you can understand this, you can write code in WORLD" people will feel they can. | |
*But I am sure that if I write on the top of a web page a full line of code and then "If you can understand this, you can write code in WORLD" people will feel they can. | |
Geomol 1-Jun-2013 [2551] | I have implemented ;{ ... } comments in World. It will be in next alpha to test it. |
GiuseppeC 1-Jun-2013 [2552] | A big reason to give World a try. |
Marco 1-Jun-2013 [2553] | On the same subject, I wish I could write: foreach item in the serie [do something] and I'd like to have single-word comments so it become: foreach item /in-the serie [do something] (the slash is only a possible (?) solution) |
Arnold 1-Jun-2013 [2554] | in-the: function [a [series!]][a] foreach item in-the serie [do something] ??? |
Geomol 1-Jun-2013 [2555] | You could even redefine IN, and get exactly, what's asked for: >> series: [1 2 3] == [1 2 3] >> in: the: func [v] [:v] >> foreach item in the series [print item] 1 2 3 >> |
Henrik 1-Jun-2013 [2556] | It might make it 10% more readable to beginners, but it will make it 90% less usable. |
GiuseppeC 1-Jun-2013 [2557] | Henrik, while I respect your, we have a different opinion. |
Gregg 1-Jun-2013 [2558] | The pass-thru func approach is an interesting thought. I wouldn't want to redfine things to do it though. |
GiuseppeC 1-Jun-2013 [2559] | Sometime I think the current keyboards and characters are limiting from programming purpose. We need more characters. |
Gregg 1-Jun-2013 [2560] | Poul Henning Kamp wrote an article about that some time back. The need to move away from the ASCII character set. |
Cyphre 1-Jun-2013 [2561] | Everytime I see THE word in a ny language I'm finished with it :-) |
Ladislav 1-Jun-2013 [2562x3] | Ladislav, I disagree with your (not so) hidden opinion that the feature I proposed is not useful at all. - Hmm, that is not exactly what I wanted to write. I wanted to express that it was an error to mistake the primitive verbosity property you described as the necessary property for Rebol to be perceived "natural (human) language resembling". |
Whether the primitive verbosity property could be useful and for whom is a matter I did not want to discuss at all. | |
WOW, I can understand this so I can program using this language . - that looks also very primitive. Such an illusion can be cured by reality too fast to take it seriously | |
GiuseppeC 1-Jun-2013 [2565] | Ladislav, I prefer to loose 9 out of 10 "wow" and having 1 continuing his rebol education than having 0 programmers attracted. |
Gregg 1-Jun-2013 [2566x3] | Giuseppe, I know you think it will help, but that doesn't mean it will. So, do an experiment to find out. Or look at other languages and see how many successful languages do it. VB was widely adopted by non-programmers and it had very few connecting words. FOR and FOR EACH being the main examples. |
I still want to update FOR, or LOOP as was discussed here some time back. It would be easy to include support for optional connecting words in that small context to see how it is received. | |
Another question to ask is: would people use them, if the support was there? Experts likely won't, unless writing examples. Will new programmers? How often do new programmers comment their code well? | |
Henrik 2-Jun-2013 [2569] | it will make it 90% less usable. - what I mean is that the beginner will grow out of this in a matter of, perhaps, days and then it will only be seen as a nuisance than an advantage. REBOL is about words and symbols and now we're spending words and symbols for no real purpose. I'm afraid it will just confuse and complicate programming in REBOL, when you first learn it with fill in words and then without those words, and simply slow down the learning process. |
Ladislav 2-Jun-2013 [2570] | Good news are that there already is a language following this design goal: #[[Wikipedia One of the design goals of it was that non-programmers—managers, supervisors, and users—could read and understand the code. This is why it has an English-like syntax and structural elements—including: nouns, verbs, clauses, sentences, sections, and divisions. Consequently, it is considered by at least one source to be "The most readable, understandable and self-documenting programming language in use today. [...] Not only does this readability generally assist the maintenance process but the older a program gets the more valuable this readability becomes." On the other hand, the mere ability to read and understand a few lines of its code does not grant to an executive or end user the experience and knowledge needed to design, build, and maintain large software systems." #]]Wikipedia Some other good news: - the wheel has already been invented: - the language is mature, having been designed in 1959 So, Giuseppe, aren't you eager to try it? It might be quite an enlightening experience for you, realize that you would immediately understand the expresions! |
Andreas 2-Jun-2013 [2571x2] | And other good news: it shares 60% of REBOL's name! |
The problem with naively catering languages to beginners is: beginners only stay beginners for so long. | |
GiuseppeC 2-Jun-2013 [2573] | None of our arguments is based on real world experiments. So my argument are still valid like yours. Ladislav, why don't you try to add this feature and lets see if the user will like it ? |
Arnold 2-Jun-2013 [2574] | COBOL? |
Ladislav 2-Jun-2013 [2575] | Ladislav, why don't you try to add this feature and lets see if the user will like it ? - I think I did explained it sufficiently: - such a feature has been implemented in a language since 1959 - I do not feel responsible for implementing every feature you may find useful |
older newer | first last |