Home » Extra libraries, Code snippets, applications etc. » U++ Esc Interpreter, Esc Macros and templates » ESC_STRING and other questions
Re: ESC_STRING and other questions [message #14821 is a reply to message #14820] |
Sun, 16 March 2008 10:41 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Shire wrote on Sun, 16 March 2008 05:18 |
Quote: |
Well, that is true, but we are not creating another C++, are we?
This is supposed to be a simple language for simple scripts. If you are running into type issues, you have choosen the wrong
tool..
|
Well, simple script languages must not force user to worry about types. But even non-professional applied programmers differ string and array. Strings have many specific operations, like toupper, find-and-replace, regexp, etc, which is useless on arrays.
|
Actually, I agree with toupper, but IMO find-and-replace or even regexp are not that useless for arrays...
Quote: |
Additionally, IMHO, majority of simple scripts work with strings hard, and I cannot imagine script language without native string type with standard operations.
|
You do not need to imagine. Esc is one
Quote: |
Optimization of map can be done in three ways:
1. Introduce new internal type, ESC_DICTionary - internally VectorMap<String, EscValue> - the most effective way, it can remove the difference between global and map.
2. Initialize map with EscDictionary (derived from EscMap and convert it to EscMap when user appends first non-string or non-number key. It is difficult to determine string and non-string.
3. Introduce new type ESC_STRING. Can be combined with 2.
|
Obviously That was the plan:
Keep array data in String as long as possible, then move to WString, then perhaps Vector<int> or even Vector<double> or Vector<String> or Vector<WString>....
Keep map data in VectorMap<String, EscValue> or VectorMap<int, EscValue> as long as possible.
But do not waste more than 1000 lines of C++ on this
Would be also nice to have some benchmark to prove the approach is really viable.
Mirek
|
|
|
|
|
ESC_STRING and other questions
By: Shire on Sat, 15 March 2008 10:37
|
|
|
Re: ESC_STRING and other questions
By: mirek on Sat, 15 March 2008 11:13
|
|
|
Re: ESC_STRING and other questions
By: Shire on Sat, 15 March 2008 12:33
|
|
|
Re: ESC_STRING and other questions
By: mirek on Sat, 15 March 2008 13:51
|
|
|
Re: ESC_STRING and other questions
By: Shire on Sat, 15 March 2008 18:53
|
|
|
Re: ESC_STRING and other questions
By: mirek on Sat, 15 March 2008 21:37
|
|
|
Re: ESC_STRING and other questions
By: Shire on Sun, 16 March 2008 10:18
|
|
|
Re: ESC_STRING and other questions
By: mirek on Sun, 16 March 2008 10:41
|
|
|
Re: ESC_STRING and other questions
By: galious on Fri, 16 May 2008 13:44
|
|
|
Re: ESC_STRING and other questions
By: mirek on Fri, 23 May 2008 09:46
|
Goto Forum:
Current Time: Sat Apr 27 06:24:03 CEST 2024
Total time taken to generate the page: 0.02844 seconds
|