Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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 Wink

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 Smile 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 Smile

Would be also nice to have some benchmark to prove the approach is really viable.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ESC and the path of Package
Next Topic: missing lambda
Goto Forum:
  


Current Time: Sat Apr 27 06:24:03 CEST 2024

Total time taken to generate the page: 0.02844 seconds