super superstricting modules

BlitzMax Forums/BlitzMax Programming/super superstricting modules

plash(Posted 2008) [#1]
Is there any chance all the brl/pub modules will go SuperStrict (to mark)??


Czar Flavius(Posted 2008) [#2]
What would be the point? They both compile to the same code. The difference is purely cosmetic. (Unlike the difference between non-strict and a strict)


Perturbatio(Posted 2008) [#3]
No, the difference is (or can be) improved performance.


plash(Posted 2008) [#4]
Yep, and its alot easier to tell if a method/function returns a value in superstrict (instead of delving through the whole thing, looking for return). I realize some modules have docs that say what, if anything, a function/method returns, but for code parsers (like bcsgen) its hard to get that kind of information.

EDIT: In most cases it will improve memory management, if things are declared in local scope in superstrict they should be GC'd right when that scope is left.


Dreamora(Posted 2008) [#5]
Strict and SuperStrict compile to the same code. Most modules are either Strict or compliant to it.


Damien Sturdy(Posted 2008) [#6]
I still think superstrict should be forced.


popcade(Posted 2008) [#7]
The 3 steps to make all modules superstrict compatible:

1.Buy BRL.
2.Hire Mark.
3.Tell him to rewrite everything under superstrict.


plash(Posted 2008) [#8]
1.Buy BRL.
2.Hire Mark.
3.Tell him to rewrite everything under superstrict.
Sounds like a deal! when will you start?

:)


Canardian(Posted 2008) [#9]
Converting from Strict to SuperStrict is usually done with a few changes. The only difference between Strict is SuperStrict is that in Strict you can declare Ints without anything:

Strict:
Local a=0
Local b#=0.01
Local c:Double=0.0000000001:Double
Local d$="Hello"

SuperStrict:
Local a%=0
Local b#=0.01
Local c:Double=0.0000000001:Double
Local d$="Hello"


plash(Posted 2008) [#10]
Nope, you have to give every variable a type identifier in SuperStrict, not just integers.

EDIT: sneaky.


Canardian(Posted 2008) [#11]
You have to do that in Strict also, since if you don't give a variable type, it will be Int.