-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic String operators are needed #277
Comments
…(caveat: it uses + to concatenate strings... see #277)
Here is some inspiration if you want to implement more operators than a fancy StringBuilder:
Most of the methods could probably go into the STL. My personal preference is Ruby, but I would not mind doing it the Go way or JS (JS is a bit too Perl IMHO). Notice that I didn't link the Java doc'. |
More cool string methods from Ruby On Rails for inspiration. |
The problem is the C generator, where it can be difficult to determine automatically when strings or dynamic structure should be freed... while other languages are garbage collected. And we probably do not want malloc and free in ThingML action language... |
The
+
is sometimes used as a hack to concatenate strings in ThingML. This is not the intended usage of+
, see #51. However, string concatenation is severely lacking in ThingML, though+
is a useful hack as it works in at least JS and Java.Having a proper concatenation operator (not necessarily with the
+
syntax) would make it much easier to implement simple serializers in a PIM way in ThingML.The text was updated successfully, but these errors were encountered: