Re: Strings again
"Roger Binns" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Mark Hahn wrote: > Are you familiar with Prothon's replacement for % ? Check out: > http://prothon.org/wiki?pagename=String.fmt%28%29 > > It can easily handle the problem you pose here since it offers positional > numbering: I agree that it can help and Python also has something similar. Heck even C has the same positional arguments thing for printf and friends. But programmers never use them. If a feature is in a language/library but noone uses it, does the feature exist? :-) > > Here is the true test. Take a sample "Hello World" program > > and also have it output todays date, and how many days of the > > month have passed as a percentage. > > > > How much extra effort (just on the coding side) is it to also > > output in German? Japanese? Hebrew? Arabic? HTML? XML? > > teletype? > > > > For the next generation of languages I believe the answer > > is going to be "none". > > I think the combination of our String.fmt() and the proposed _"xxx" format > strings could do the job, once the other elements of Prothon (html, xml, > date functions, etc.) are complete. I hope you lead by example, actually making all examples in the documentation/tutorials use those language elements, as well as the standard library. It will soon show you how much fun it is and perhaps give you better ideas to make it easier on programmers to do the "right thing" from the start. Roger Roger