get the type of a variable
-
I am not sure if there is something like type() in fuze but maybe it would be usefull i know that it exists for example in python.
-
@petermeisenstein Not currently I'm afraid
-
@pianofire Would be this a possible new feature?Maybe you can do it with a workaround in fuze.But i think type is sometimes usefull if you for example want to write a test.
-
@petermeisenstein I guess so but it is probably not a priority
-
@pianofire I mean i dont write much fuze code. But maybe its nice if you have much off variables hiding in your code and you cant remeber them all. So you can quick made for example
a="Hello"
type(a)or even
if type(a)==string then print ("string") update()
(I know writing one line code is ugly but i dont care for this example) -
@petermeisenstein I know what you are saying but Fuze is generally very relaxed about types. In your example print will print any type of variable so you don't need to know what the type is in this case
-
@pianofire Isnt it sometimes a problem that fuze is that kind of relaxed when it comes to types. I mean on the one hand fuze is for beginners and made with the ability to be as easy as possible. But i mean on the other hand it maybe is a big problem if you want to switch for example to C. I come from python who is also very relaxed about types. But i also heard that it sometimes is good to have a better control over the code. Not control in point of execution control in point of good looking code. But perhaps i am totally wrong with that.