获得高级隐藏所有广告
发表: 9   谁浏览过: 32 users
05.05.2015 - 20:33
<Bunch of codes>
ed: // Oh no! Is an Etiquette! Maybe he confused it with the ;.

<Bunch of codes>
GOTO ed







Now you may not understand where's the joke. I asked my teacher if in python you could actually use etiquette. I receive the same answer as my other teacher in the last year:

"Etiquette? What do you mean? Is that used for GOTO sentences? Well I don't know if you can use them on python, but don't worry because that code is prohibited here. In structured programming GOTO makes it "Spaguetti programming". Definitively never use GOTO.... Of course! When programming we make magic... but White magic!!! Not black magic or something diabolic like GOTO!!!"

At the same time, it results kinda weird how the rest of the students also added: "That is an evil code!".

His answer really doesn't differ with my other teacher, funny as always, says "GOTO is ban-listed from the realm of the sane people, good programming skills and codes. This is why we don't teach trash like GOTO here...".

Might want to ask to the programmer community why there is so much hate against this sentence, GOTO. Personally when I was in school and my teacher taught us programming, there were just three type of sentences that made me up to choose this career. I call them "IF-THEN-GOTO". Though the probabilities would'be infinite with just those three codes. One can compare, and other can redirect somewhere else.

From what I've read surfing the net, I found arguments type "When you use GOTO, your whole code is a Mess and it doesn't result intuitive to know why your program start there. In the structure programming, the old GOTO had been replaced by codes that can be easy controlled, such as Switch-Case clauses and also Function... However, if for one reason, one day, somehow, a program requires the use of GOTO for being completed.... then this is why the sentence had been include in most of the modern programming tools. This doesn't means you should use it".

If Both of my teachers reacts so negatives toward GOTO... I can only expect others programmers reacts in the same way against it.
载入中...
载入中...
05.05.2015 - 20:46
Why not use GOTO conditionally? On N GOTO
----
载入中...
载入中...
05.05.2015 - 22:14
Unknown Gamer
账户已删除
I don't know programming.
载入中...
载入中...
05.05.2015 - 22:22
Unknown Gamer
账户已删除
You are a programmer? @clovis
载入中...
载入中...
06.05.2015 - 04:10
作者: Guest, 05.05.2015 at 22:22

You are a programmer? @clovis

Programmer? that's BASIC which he would have learnt in 8th grade.
----
载入中...
载入中...
06.05.2015 - 04:33
@CLOVIS

Well the programmer who uses GOTO statement is considered as a noob programmer. It is not appreciated to use GOTO as a programmer does it unconditionally, however the use of ON N GOTO is appreciated as it is a conditional transfer of control a. So the programmers are callled nubs to transfer control without a reason, that is why it is not appreciable.
----
载入中...
载入中...
06.05.2015 - 06:42
Unknown Gamer
账户已删除
作者: Flaming Spaz, 06.05.2015 at 04:10

作者: Guest, 05.05.2015 at 22:22

You are a programmer? @clovis

Programmer? that's BASIC which he would have learnt in 8th grade.

Sorry, I don't know anything about computers.
载入中...
载入中...
06.05.2015 - 14:03
#StopClovis2k15
----
载入中...
载入中...
06.05.2015 - 21:12
作者: Flaming Spaz, 06.05.2015 at 04:33

@CLOVIS
Well the programmer who uses GOTO statement is considered as a noob programmer.


I am noob I know ;_;. Well I haven't used GOTO since school so...

作者: Flaming Spaz, 06.05.2015 at 04:33

It is not appreciated to use GOTO as a programmer does it unconditionally, however the use of ON N GOTO is appreciated as it is a conditional transfer of control a. So the programmers are callled nubs to transfer control without a reason, that is why it is not appreciable.


I don't really know what does ON N GOTO means, but from what I've search, it seems to do the same as a Switch-case statement.

Basically, for avoid GOTO the programmers added codes that works like a GOTO on different sentences....

Continue, Break for start or finish a loop...
Switch-Case clauses for redirect to an specific case, depending of the value (most closer code to GOTO IMO).
Functions for... those times we need a new process but don't want to write a lot of codes in the main code...

Edit:

Mind also that all those function could'be done with GOTO... specially the do-while code...
载入中...
载入中...
atWar

About Us
Contact

隐私条例 | 服务条例 | 横额 | Partners

Copyright © 2024 atWar. All rights reserved.

加入我们在

将游戏传播出去!