Hi,
sorry if there was already this question, but I couldn’t find it anywhere.
I’m looking in the OO-design concerns and it seams that Java guys are crazy
about returning the collection that is used for state of an objects. The only
acceptable option is returning it in the immutable wrapper.
On 05/12/2014 10:54 PM, Nicolas Cellier wrote:
But Smalltalk V was cheap, small, fairly well documented and worked on
windows (DOS even).
Yes, I even used it IIRC, but it was not gratis.
And IMHO the only way to compete back then with the big boys (MS,
Borland etc) was to either be gratis or
… Which is extremely annoying when writing blocks with arguments on a norwegian
OSX keyboard.
| is Alt - 7, when I don’t release the Alt key before the following space, and
a NBSP is inserted instead of a space character, which breaks both the parser
and syntax highlighting.
When doit’ing, you
2014-05-13 10:53 GMT+01:00 Yuriy Tymchuk yuriy.tymc...@me.com:
I’m looking in the OO-design concerns and it seams that Java guys are crazy
There's your answer :D
Cheers,
Sergi
I think it is more an issue of design.
If your Invoice has a collection of Items, you shouldn't manipulate
the collection directly and instead use accessor/operator methods.
I wouldn't restrict having the option of direct manipulation of the
collection, but it is a nice thing to have covered by
Well, an issue of good OO design or not. Returning a mutable collection breaks
encapsulation. My initial question is whether the collection is simply a detail
of the implementation or part of the external interface you want to expose. If
the former, hide the collection and expose operations
Ok, I also forgot to tell my own opinion. If you as something for it’s model
(or some other thing), you get it. Now it’s up to you if you want to modify it
or not. The idea behind encapsulation rules is that you don’t force someone to
rely on your internal data. So to allow someone add thing to
indeed. simply don't expose unwanted operations to the user.
there's many ways to do that and wrapping it is just one of it.
On 13 May 2014 15:47, David Astels dast...@icloud.com wrote:
Well, an issue of good OO design or not. Returning a mutable collection
breaks encapsulation. My initial
I got an interest some years ago, to see if Context-Oriented-Programming would
help to have immutable collections.
Apparently, Java supports immutability at runtime (i.e., there is no class
ImmutableArrayList as far as I know). So, there is no good design for immutable
collections as far as I
Also, I know that side-effect (e.g., adding or removing an element to a
collection) does not work well with type-safety. E.g., Side-effect prevents
many type system from being type-safe
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
On 13/05/14 15:50, Alexandre Bergel wrote:
I got an interest some years ago, to see if Context-Oriented-Programming would
help to have immutable collections.
Apparently, Java supports immutability at runtime (i.e., there is no class
ImmutableArrayList as far as I know).
Actually there is.
You could answer a copy of the collection, so it won't matter
internally if they try to add to it. Or you could wrap the collection
with operations too.
However, doing that, I suppose someone could still write, (someObject
instVarNamed: 'internalCollection') add: junk. So, why bother?
Writing
Hoi!
Eliot wrote:
Pharo isn't inspired by Smalltalk; it /is/ a Smalltalk. Trying to
be mealy-mouthed about it and claiming inspiration, rather than
proudly declaring its a Smalltalk is IMO as bad as apologizing for it
being dead... We don't need to avoid the S word...
Sean later
Well, this is not what I exactly meant:
http://www.tutorialspoint.com/java/util/collections_unmodifiablelist.htm
The class Collection define the method:
public static T ListT unmodifiableList(List? extends T list)
It returns an instance of List. I do not think there is a type
If someone uses your class by using instVarNamed, they deserve any pain that
results. Your job is to publish a clean public interface to your class, their
job is to use that interface.
On May 13, 2014, at 10:29 AM, Chris Muller asquea...@gmail.com wrote:
You could answer a copy of the
Good evening,
Le 11/05/2014 17:21, Eliot Miranda a écrit :
Hilaire, perhaps you can tell me whether touch support is OK or whether work
needs to be done in the VM?
I don't really know regarding the VM. I remember Bert did some
experiment with multitouch on Etoys, but I can't tell if it was a
Le 11/05/2014 17:21, Eliot Miranda a écrit :
On iPhone Apple expressly forbid JITs other than their own so until that
changes the fastest VM on iPhone will be the Stack VM.
When the iPad came out, I remember about anxiety in the community
deploying Smalltalk application will be rejected by
fixed (since yesterday, but I forgot to send the mail :P)
thanks for report
Esteban
On 13 May 2014, at 00:09, Nicolai Hess nicolaih...@web.de wrote:
link for windows vm is wrong(Custom Downloads):
http://files.pharo.org/vm/pharo/win/Pharo-VM-linux-stable.zip
correct one:
2014-05-13 14:28 GMT+01:00 Esteban A. Maringolo emaring...@gmail.com:
I wouldn't restrict having the option of direct manipulation of the
collection, but it is a nice thing to have covered by some LINT rules.
:)
That´s what I meant, in a convoluted way, with they are crazy. For me,
Java is
On Tue, May 13, 2014 at 4:08 AM, Henrik Johansen
henrik.s.johan...@veloxit.no wrote:
… Which is extremely annoying when writing blocks with arguments on a
norwegian OSX keyboard.
| is Alt - 7, when I don’t release the Alt key before the following space,
and a NBSP is inserted instead of a
On 05/13/2014 10:45 AM, Craig Latta wrote:
Hoi!
Eliot wrote:
Pharo isn't inspired by Smalltalk; it /is/ a Smalltalk. Trying to
be mealy-mouthed about it and claiming inspiration, rather than
proudly declaring its a Smalltalk is IMO as bad as apologizing for it
being dead... We don't
Hi
The advantage is that there is a standard library for implementing efficient
unmodifiable “read-only” collections. Just because the Java ‘crowd’ have it
doesn’t mean they misuse it (or that they do not understand OO); there are the
odd occasions when it is useful to tighten down your
22 matches
Mail list logo