EnableExplicit on by default.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

it's essential. :wink:
--Kale

Image
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Kale wrote:it's essential. :wink:
Nope :P
quidquid Latine dictum sit altum videtur
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Post by Poshu »

freak wrote:
Nope :P
It is.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

For those who believe it is essential, it's probably well worth the few characters you have to enter to enable it.

cheers
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

Kale wrote:EnableExplicit is essential for any serious PB program you write.
agreed
rsts wrote:For those who believe it is essential, it's probably well worth the few characters you have to enter to enable it.
agreed
akj wrote:Traditionally one of the big features of Basic is that beginners can ignore all code housekeeping/declarations and still get simple programs to work.
Making EnableExplicit the default would be another departure from this tenet of simplicity.
best argument of all
oh... and have a nice day.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Most error from beginners a false typed variables, false scope of variables
and so on. EnableExplicit is the only way to help beginners.

Beginner make copy and paste with missing thinks, EnableExplicit should
help, so it's for beginners the best using this great feature.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> EnableExplicit is the only way to help beginners

Nah, it only holds their hand and doesn't teach them to code carefully. IMO.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

akj wrote:Traditionally one of the big features of Basic is that beginners can ignore all code housekeeping/declarations and still get simple programs to work.
Which traditionally produces bad programmers.
akj wrote:> EnableExplicit is the only way to help beginners
Nah, it only holds their hand and doesn't teach them to code carefully. IMO.
Holding beginners' hands is the only way to teach them properly. Learning to code 'carefully' with discipline is not something a beginner would do and is simply the process of unnecessarily trying to avoid pitfalls that can be caught automatically by the compiler. Honestly, why make things hard?

Saying that, I wouldn't want EnableExplicit enabled by default though.
--Kale

Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I'm no beginner and all I can say is that when I do not use EnableExplicit I spend much more time hunting bugs than I do when using this option! :wink:

Still, I do not understand the fuss; use it if you wish etc?
I may look like a mule, but I'm not a complete ass.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I find it a luxury to be able to draft code without having to think about having to use Define/Protected all the time. I only add EnabledExplicit after I'm satisfied with my code and begin locking down on its functionality.
freak wrote:If it you have no problem putting 'Define' before every single variable, why is it such a big deal to put a single 'EnableExplicit' in the source ? :mrgreen:
freak as a point. :)
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

No training wheels by default please!

Yes Enable Explicit is useful but not while your hacking about.


Can't remember what you typed five minutes ago?

Do you get a bit dizzy while wading through 30000 lines of code?

Find it hard to actually write code these days?

What you need is the safety and security of a Zimmer Frame.
At microsoft we understand our market and created the tools of tomorrow, today. We guarantee .Net will get you moving again at your slower pace, letting you get on with writing the solutions with total peace of mind in a safe secure dribble proof environment, designed to support you. With .Net you'll be producing professional Crippledware(tm) in no time at all!
:wink:
Post Reply