Hard typing
Posted: Sun May 17, 2009 3:14 am
Here is an eScript feature request that might just polarise the whole community- hard typing.
I just had a potential scripter tell me he didn't want to learn eScript because it doesn't have hard typing and it is an omission that caused him to have a lot of troubles debugging a script. I thought he was a bit severe in his assessment, but then I started thinking about variables in general and how we declare them. It certainly wouldn't hurt to have an optional compile feature that forced us to state the type of variable when we declare it.
We can certainly give initial values already - eg var Name := ""; and var Members := array;
but then the compiler doesn't care what you assign that variable name later and it's only really useful for you as a reference.
So, would it be worth it? I realise it's a huge task, but maybe we can have it enabled script by script so we can convert slowly.
I just had a potential scripter tell me he didn't want to learn eScript because it doesn't have hard typing and it is an omission that caused him to have a lot of troubles debugging a script. I thought he was a bit severe in his assessment, but then I started thinking about variables in general and how we declare them. It certainly wouldn't hurt to have an optional compile feature that forced us to state the type of variable when we declare it.
We can certainly give initial values already - eg var Name := ""; and var Members := array;
but then the compiler doesn't care what you assign that variable name later and it's only really useful for you as a reference.
So, would it be worth it? I realise it's a huge task, but maybe we can have it enabled script by script so we can convert slowly.