I do not understand problem. If someone else writes that code it his his choice to pick whatever style is to be used. Try to contribute to some project by providing patch that does not comform to official code style/guidelines. I do not think project maintainers will be too happy. Its their code, you follow their rules. Want your own rules? Make your own thing.
It would be much more wise to suggest adding such alias to stdlib instead of changing it altogether. Maybe some people really like echo. Or maybe they enjoy writing one letter less when they print things. Oh lets not forget sea of code that would be broken by replacing echo with whatever.
P.S. it is considered as good manners if person edits his previous post instead of posting two posts side by side ;)
"The use of 'echo' for output annoys me. I know it's totally subjective but I don't like it because it makes me think of sh programming which I hate."
Having a global alias, I wouldn't mind, but removing it completely would be a waste of time when we could be working towards actually getting 1.0 finished.
Simple answer is: no, echo won't ever be changed. Will there be built in aliases in the future? Maybe.
when we could be working towards actually getting 1.0 finished.
Simple answer is: no, echo won't ever be changed.
May I ask when YOU intend to release Nim 1.0?
[Added]
Of course the term "echo" has some advantages: It is uniq and short, and most people can guess well what it does. For "print" one may think printing on paper and it has one more letter, and puts as used by Ruby can have many meanings and may exist in many modules. The fact that echo is used in Shell/Bash surely can not poison the term. Only ugly point which I could imagine is the meaning related to "repeat" -- in my opinion there is no real repeat operation involved, but at least for plain strings I can imagine that the string I typed in the program source code is repeated on the terminal screen when the program is executed. So it is fine for me. :-)
While you could make good arguments for both echo and print, there's really not enough of an advantage or disadvantage either way in order for such a breaking change to occur so late during Nim's development. And for every person who prefers print, there'll be another who prefers echo.
And the problem with alternatively installing print as a global alias for echo is that it would essentially make print another reserved identifier (as it's overloaded for any number of arguments that have string conversion defined, which is almost anything), which is undesirable. And there are plenty of situations where people may want to use print for a procedure of their own.
i personally like echo.
print & printf are ugly, System.out.print & Console.Writeline are so fucking long, cout is such a mess
echo, just simple as that, why would you change it ?
...I dislike 'echo' for output its because it evokes the wrong mental model...
Strict mental models aren't needed for simple operations. They're needed to grasp complexity.
Are we also going to be worried about $ as a .toString() function? Of course not. It's a simple matter of memorization. There's no deeper concept to be reminded of with a strictly representative name.
I like echo echo sounds more systemish print sounds like printing a document.
Btw i come from python.
I also want to defend renaming of echo to print. If you take a look at "Syntax across languages" page: http://rigaux.org/language-study/syntax-across-languages.html#StrngSmplPrnt you notice that echo is used by marginal languages (shell, PHP), which are farther from your target audience than Python, Ruby, Java and other respectable languages. One of strengths of Python is very low barrier to entry: you see several examples and start to code. It would be great if your language has barrier of same height, and print instead of echo would bring this goal closer. Also, there are some people who turn away from language just because it uses rare keywords/idioms, they won't even read full tutorial to discover brilliance of your language. Even if number of such people relatively small, say, 0.1% it is nevertheless considerable number. There are 64 followers of Nim and 54700 followers of Python on SO, so care about even such trifles can double your user base. Several people here said that echo is better than print, but it may be bias: Nim attracts and leaves people, who like echo, other go away.
One more important point: function is more powerful and flexible than simple keyword and this forced van Rossum to change "print" to function on very late stage of language development. You are still very young, maybe do this change now?
https://en.wikipedia.org/wiki/Parkinson%27s_law_of_triviality
It's even worse when it's based on "I personally hate X and Y reminds me of X so change Y to Z" rather than some rational basis.
Well you know there is this invention call computers that are pretty good at tedious repetitive tasks like replacing a word by another everywhere...
I'm looking for the command on my computer that allows me to search and replace some text in every piece of nim code on every computer on the planet, but can't seem to locate it.
And even nimfix cannot do completely:
In addition to metaprogramming, there's the little matter of comments. Global search and replace results in things like http://voices.washingtonpost.com/sleuth/2008/07/christian_sites_ban_on_g_word.html
In fact, I cannot believe I'm actually answering here.
It's not like any of us have anything better to do.
You are still very young, maybe do this change now?
echo is a macro, not a keyword. In any case, Python's change of print from a statement to a function has no relevance to the issue here.
I would call it summon(). Sounds cooler than echo or print and also describes the magic which happens when suddenly out of nothing the first hello world appears on the screen!
This will also attract all the people which do not like to use a language which uses echo or print or write or other strange words. Choosing a computer language should only be based on taste for syntax and how things are named. Code needs to sound beautiful when read and bring some mystery at best!
I guess this will also attract a lot of people which never thought they will program in their lives. That number is massive and you can rely on them being much more in numbers than the python or even the php crowd! Php even has both: print and echo... just pathetic. I wonder how any code ever could be written with that.
The magic of "summon()" also brings hope into this world and in itself could change the world. If you do not follow this proposal you may not even care about the environment and humanity at all. So please let us rewrite all code and use summon() for those very important reasons!
OderWat summons irony !
Topic loses 20HP.