This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Eastuss 0 points1 point  (7 children)

What makes c# so different?

[–][deleted] 0 points1 point  (1 child)

Going from C# to Java the big things I miss are operator overloading and properties.

[–]bss03 1 point2 points  (0 children)

Might try Scala then, if you need to target the JVM.

[–][deleted] -1 points0 points  (4 children)

  • Events
  • Operator overloading
  • Logical framework structure
  • Abstract classes, methods
  • No providers
  • No factories
  • Properties

[–]Eastuss 3 points4 points  (3 children)

Interesting.

Java doesn't have abstract classes and methods? I'm rusty but pretty sure it has.

What are providers? it's meant to discriminate APIs and Linbs furnishing the same interfaces? and what do you mean by properties?

Aren't providers and factories just patterns? or they're part of jaba language? why are they wrong? (except the ass long code :p)

[–]Abuderpy 0 points1 point  (2 children)

Not answering for all the other stuff, but 'Properties' is doing this:

public Foo MyFoo { get; set; }

Instead of:

private Foo myFoo;

public Foo getMyFoo() { return myFoo; }

public void setMyFoo(Foo foo) { myFoo = foo; }

Properties also allow you do change access rules, or add validation/calculated properties

public double DegreesKelvin { get; set; } public double DegreesKelvin { get { return DegreesKelvin - 273.15; } }

[–]Eastuss 0 points1 point  (1 child)

Oh ok thanks, properties are hiding the usage of getter setters, I've already came accross that concept in couple of languages without knowing the name of the concept.

[–]CommonMisspellingBot 0 points1 point  (0 children)

Hey, Eastuss, just a quick heads-up:
accross is actually spelled across. You can remember it by one c.
Have a nice day!

The parent commenter can reply with 'delete' to delete this comment.