News for hackers. Stuff that matters.
Re:Larry Wall has approved renaming Perl 6 to Raku by theonemind on Friday October 11, 2019 @04:17PM (#21228059)
I find programming perl fun inversely to program size and proportionally to the need to slice and dice text. I didn't learn perl until the perl 5 era, but from what I can tell, I would've been as satisfied with perl 4, before they bolted on OO and tried to expand the applicable problem domain of the language. I mostly just use it as a super-charged awk and bash replacement for scripting.
Re:Larry Wall has approved renaming Perl 6 to Raku by tyingq on Friday October 11, 2019 @04:57PM (#21228399)
The bolted on OO is really just one new function...bless(). The rest is package namespaces, which are also used for non OO purposes.

I'm never sure what people don't like about OO Perl. There's a tiny bit of boilerplate in a constructor, other than that, it doesn't seem different from other OO script languages.

Re:Larry Wall has approved renaming Perl 6 to Raku by hnick on Friday October 11, 2019 @07:33PM (#21229359)
It's not terrible to get working, but for many people a major point of OO is encapsulation and it doesn't work out of the box like that. You have to install another package or use the inside-out object model to prevent direct access to package variables and 'private' functions are usually by naming convention only.

It's just another example of Perl's biggest strength and weakness. Total freedom to build something amazing or shoot yourself in the foot.

Re:Larry Wall has approved renaming Perl 6 to Raku by jlokier on Friday October 11, 2019 @09:16PM (#21229863)
Python and Perl have almost exactly the same OO model, yet many people quite like Python's OO, so that can't be it surely...

There's no private data or private methods in Python objects. All the properties are right there for anyone to read, protected only by convention.

JavaScript and Perl have almost exactly the same OO model, yet many people quite like JavaScript's OO, so that can't be it, surely...

There's no private data or private methods in JavaScript objects. All the properties are right there for anyone to read, protected only by convention.

(It's closer than it looks. Perl's "bless" function means almost the same as JavaScript's ".__proto__ =", and inside-out data hiding is possible in JavaScript much the same as Perl, although hardly anyone uses it in either language.)

Re:Larry Wall has approved renaming Perl 6 to Raku by hnick on Friday October 11, 2019 @09:56PM (#21230067)
I'm not necessarily a fan of the OO in those either :)

I try to use OO sparingly when possible, and in Perl that generally just means I've been using a hash and decide it'd be more convenient that it keep some functions to itself rather than pass it around to other functions.

I will say in Perl's defense, the bare implementation really made me appreciate what OO actually is under the hood. I felt like I understood it much better, especially since it takes a mixed approach (rather than 'everything must be an object, including Program.cs' which I never really enjoyed).

Re:Larry Wall has approved renaming Perl 6 to Raku by Grinnz on Saturday October 12, 2019 @12:57AM (#21230775)
It does make it very clear that it is just a data structure (state) associated with a class (behavior).
Re:Larry Wall has approved renaming Perl 6 to Raku by tyingq on Saturday October 12, 2019 @10:32AM (#21233422)
It's also pretty neat that you can bless any type as an object. People use the hash most often for obvious reasons, but you can use a scalar/string, array, etc, if you wish.
Re:Larry Wall has approved renaming Perl 6 to Raku by tyingq on Saturday October 12, 2019 @12:04AM (#21230590)
That's fair, though as mentioned, not much different from other scripting languages with OO. The _private convention seems to work ok in practice, if not in theory.
Re:Larry Wall has approved renaming Perl 6 to Raku by kbenson on Friday October 11, 2019 @05:42PM (#21228766)
Agreed. Not to mention, from what I understand they just borrowed the OO system from Python, so it shouldn't be that foreign to most people.