A Bit Baffling

Talk about anything
gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: A Bit Baffling

04 May 2018, 17:42

Reuseability is a complete myth. How many times have you actually plugged a previous bit of code into new source code? Probably never. This is because context defines the massively unpredictable interactions between input and output. So the hoped-for black box reuse is a complete non-starter.
You can dislike OOP and it is certainly not the only way to do something, but this is utter nonsense. You can speak for yourself, but it just sounds like you are not doing it right... or not much at all. This seems just like an artificial confrontation with a lot of commonplaces instead of facts.
But hey, you can always fork...
User avatar
Era
Posts: 26
Joined: 28 Apr 2018, 22:36

Re: A Bit Baffling

04 May 2018, 18:33

How many times, gregster??
gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: A Bit Baffling

04 May 2018, 19:22

Often enough... I started to create classes when I noticed how often I re-used my code. And often enough I don't use classes. It depends on the use case. Simple as that.
But you still didn't answer lexikos:
lexikos wrote:Please give an example of a move toward OOP in v2 that you find baffling.
I am entertained easily, but like this, this attempt of a drama is getting trite quickly.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: A Bit Baffling

05 May 2018, 01:44

Era wrote:
nnnik wrote:Only very few things make sense as functions.
  1. Functions are for the parts in your script that you are never going to reuse as objects are meant for and superior for reuseability.
  2. Functions are for the parts of your script that access super globally, because if you don't need them everywhere encapsulating them in an object makes more sense.

Reuseability is a complete myth. How many times have you actually plugged a previous bit of code into new source code? Probably never. This is because context defines the massively unpredictable interactions between input and output. So the hoped-for black box reuse is a complete non-starter.

I've been hearing for three decades about how this and that will allow you to reuse code. Beyond any but the most simplistic, short, code snippet, reuse is more trouble than it's worth.

Crockery.
I have reused code before - many times actually. You can even make Functions reuseable but they are not that great at that. One example of reuseable functions is gdip.ahk
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: A Bit Baffling

05 May 2018, 01:49

Era wrote:My dear Mr. ? SwagFag:
Functions can be provided with input/output descriptions via comments...so you don't need to tax your pretty head with reading the code within. I/O comments are quite like OOP in that way, without the messy code hiding and cascade. You can tell people what to put in , and what to expect out. Just like a laxative. Get it?
So it's okay if functions are black boxes but if classes are it isn't?

Also please stop that belittling tone with our helpers.
Recommends AHK Studio
User avatar
Era
Posts: 26
Joined: 28 Apr 2018, 22:36

Re: A Bit Baffling

05 May 2018, 04:03

nnnik wrote:
Era wrote:My dear Mr. ? SwagFag:
Functions can be provided with input/output descriptions via comments...so you don't need to tax your pretty head with reading the code within. I/O comments are quite like OOP in that way, without the messy code hiding and cascade. You can tell people what to put in , and what to expect out. Just like a laxative. Get it?
So it's okay if functions are black boxes but if classes are it isn't?

Also please stop that belittling tone with our helpers.
1. Functions are not encapsulated, thus the code is visible, readable, modifiable. So, they're not black boxes as are inherited objects hidden away somewhere up the chain of inheritance.

2. As for my tone, if you read my initial message you'll see that I was complementary and respectful. The tone became a bit dark as others got snide with comments like: "trite," "artificial," utter nonsense," "no brainer," "he was just trying to troll."

Anyway, OOP mostly serves purposes unrelated to personal, individual coding. It's at base a clerical system, an effort at version control when people program in groups. Plus its theoretical abstractions appeal to academics and its complexity creates job protection via obscurantism.
Last edited by Era on 05 May 2018, 16:56, edited 1 time in total.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: A Bit Baffling

05 May 2018, 04:39

Do you believe in conspiracy theories?

1. Functions are encapsulation of code, the code is visible, readable, modifiable both for objects and for functions. They are black boxes until you can gain a white box perspective - that holds truth for anything.
Therefore functions using functions to do stuff have the same kind of issue as objects if you dont know the functions that are used yet. Same holds truth for Objects.

2. I am not an english native but towards me it didn't seem like "no brainer" was meant as an insult but rather to tell what he felt about it - it's an unfortunate misunderstanding we should all calm down
Recommends AHK Studio
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: A Bit Baffling

05 May 2018, 15:59

Era wrote:My dear Mr. ? SwagFag:
Functions can be provided with input/output descriptions via comments...so you don't need to tax your pretty head with reading the code within. I/O comments are quite like OOP in that way, without the messy code hiding and cascade. You can tell people what to put in , and what to expect out. Just like a laxative. Get it?
i mean, i can understand how the benefits of oop might elude the novice programmer, but once youve moved on from your basic 10 liner helloworld scripts onto actual projects, whether they be personal or not, youll realize what an immensely powerful tool oop truly is.

keep on truckin, mang. im sure ull get there someday ;)
User avatar
Era
Posts: 26
Joined: 28 Apr 2018, 22:36

Re: A Bit Baffling

05 May 2018, 16:20

In any sensible programming language, Hello World! would require only a single line of code, not ten.

So, by effectively proving my primary argument (although clearly you are quite unconscious of having done so), I must hope that you become at some point aware that your blithe self-confidence can be hard for others to understand.
Last edited by Era on 06 May 2018, 01:44, edited 1 time in total.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: A Bit Baffling

05 May 2018, 21:43

You prove your main argument that the over head of OOP exists.
You have not yet defeated the counter argument that the over head gives the programmer better abilities over the long run.
Recommends AHK Studio
User avatar
Era
Posts: 26
Joined: 28 Apr 2018, 22:36

Re: A Bit Baffling

06 May 2018, 00:11

nnnik wrote:You prove your main argument that the over head of OOP exists.

You have not yet defeated the counter argument that the over head gives the programmer better abilities over the long run.
You're right, but I don't think proof is possible because the dispute isn't fundamentally about programming; it's about religion. True believers in OOP will defend it endlessly.

And I'm actually not saying that OOP is useless. As the first post mentions, OOP has its virtues in gang-programming.
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: A Bit Baffling

06 May 2018, 16:02

I must hope that you become at some point aware that your blithe self-confidence can be hard for others to understand.
I don't think proof is possible because the dispute isn't fundamentally about programming; it's about religion. True believers in OOP will defend it endlessly.
Your posts are the same.

Since this has apparently nothing to do with AutoHotkey v2 Development, I have moved the topic to Offtopic.
User avatar
Era
Posts: 26
Joined: 28 Apr 2018, 22:36

Re: A Bit Baffling

06 May 2018, 16:19

You know best. To me, though, it does have to do with V2. Sorry I didn't respond to your query.
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: A Bit Baffling

07 May 2018, 07:10

Era wrote:And if they do encapsulation, you can't even see the code to know what the h is going on!
...
Functions are not encapsulated, thus the code is visible, readable, modifiable.
The average AutoHotkey user relies on numerous functions without ever reading or modifying the code inside those functions. Some of those aren't even built-in, but functions posted on the forum. You don't need to "see the code to know what the h is going on" if the function or object holds to its contract.
Anyway, OOP mostly serves purposes unrelated to personal, individual coding. It's at base a clerical system, an effort at version control when people program in groups. Plus its theoretical abstractions appeal to academics and its complexity creates job protection via obscurantism.
Certain aspects of OOP (i.e. the ones that I've implemented) have clear value to me as an individual developer, so your argument falls flat from my perspective.

This isn't my job and I code alone 99% of the time, so I'll just accept what you (and others) say about benefits to group programming and "job protection". If OOP is for groups and academic types, let groups and academic types have it; everyone else may benefit from what they produce.

I'm not interested in theoretical arguments for or against OOP in general. I am more interested in feedback that has some direct real-world application, such as what changes in v2 make the program harder to use, or what changes could make it easier to use.
User avatar
Era
Posts: 26
Joined: 28 Apr 2018, 22:36

Re: A Bit Baffling

07 May 2018, 13:12

I understand your point. When I've learned more about v1, I'll study v2. Maybe have some suggestions. In the meantime, I do hope they decide to eliminate :=
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: A Bit Baffling

07 May 2018, 14:02

We decided to eliminate = for assignments.
Recommends AHK Studio

Return to “Off-topic Discussion”

Who is online

Users browsing this forum: -Garfle- and 53 guests