开发者

Style and coding practice for a very weakly typed language

开发者 https://www.devze.com 2022-12-31 18:28 出处:网络
I am using a proprietary languag开发者_StackOverflowe called VGL which really does not type variables at all.

I am using a proprietary languag开发者_StackOverflowe called VGL which really does not type variables at all. For Example I could Declare variables as such:

DECLARE thisvariable, thatvariable, anothervariable

all three of the above variables can be used in any different way I choose, string, integer, character, float, Boolean etc...

The product in it's next version is going to start incorporating C# into it's program scripting instead of VGL.

My thinking is to use a modified Hungarian Notation to at least show the intended use of a variable and make the code a little more readable i.e. integer intVariableName, float fltVariableName etc... but try to stay to close as possible to the .net naming convention as we can.

Does anyone have a better opinion of a naming convention to use?


I personally don't care for Hungarian notation; even in C code, it's just not user-friendly. An excellent language-agnostic discussion of naming conventions is in Code Complete.

Does VGL have a static runtime type like Python, or fully dynamic types like JavaScript? I mean, can a variable of one type be assigned a value of another type?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号