[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
>bash still doesn't support goto >windows batch scripting
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 19
Thread images: 2
File: 105.gif (227 KB, 600x600) Image search: [Google]
105.gif
227 KB, 600x600
>bash still doesn't support goto
>windows batch scripting has been supporting goto since MS DOS.

u mad freetards?
>>
>>54676975
>implying goto is a desirable feature
>>
>>54676975
>goto
hahahahaha
>>
>>54676994
how is it not a desirable feature? it can be extremely useful. also, it's what all loops and switches are converted to when compiling code. so basically bash allows you to do everything goto is used for with loops and switches, except actually going to a specified line.
>>
>>54677026
>freetards making fun of a common and convenient programming construct because their freetard software doesn't understand it

wow you guys are transparent as fuck
>>
>>54677092
Bash doesn't need goto, retard
>>
>>54677401
>Want to make your program repeat itself as long as the user doesn't manually exit.
>Have to put the entire code in a do until loop instead of just using goto.

Stupid.


And what do you do if you want to make links between parts of your script that cross over each other?
>>
>>54677092
>Winbaby tries to insult freedom ware because he knows freedom ware is superior

OP is transparent as fuck
>>
>>54677441
You obviously don't completely understand how shell scripts work.
>>
File: 1451574381691.jpg (203 KB, 1280x960) Image search: [Google]
1451574381691.jpg
203 KB, 1280x960
>serious replies
>>
>>54676975
>Do one thing and do it well.
Just use nested loops you little giggling shit.
>>
>>54677472
more.

of the pic, not serious replies.
>>
>>54677468
What? What don't I understand? I'd love to hear your explaination here because I'm guessing it goes beyond the wildest depths of my imagination.

Shell scripts is one of the more concrete, more virtual form of "programming" out there. It is literally a binary interpreter your script by reading it character by character. It has total control over how it runs the script.

Bash has switches, while loops, do loops, for loops, the whole suite. Those are basically specific implementations of "goto". In fact, when you compile code that has switches or loops into binary, the compiler turns them into goto loops because that's all the CPU can understand. If the script interpreter is able to do loops, it's able to do simple gotos. It just doesn't want to for some reason.
>>
>>54677524
*interpreting
>>
>>54677441
While loops are far more intuitive than using gotos. I mean, all loops are handled with gotos at the processor level, but loops exist as syntactic sugar that does the same thing but is much more readable.
>>
>>54677665
Yes but sometimes you just want to go to a line of code without it being part of a loop or a conditional switch.
>>
>>54677665
>While loops are far more intuitive than using gotos.
I disagree.

The idea of an instruction that says "do *THIS next" is much more intuitive than the loop/flow-control/conditional blob that is required to understand a WHILE (or FOR/DO) loop.
>>
>>54677665
>While loops are far more intuitive than using gotos.
while and goto are very different logical pieces at a semantic level. you can force one to work in place of the other, but they're far from immediately interchangeable (and frankly other constructs make more sense anyway).
>>
>>54676975
TOSHINO KYOKOOOOOOOOOOOO
Thread replies: 19
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.