WEREWOLF UNRELATED THREAD

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

SoraZodia

Forum Ghost
Third Party Pack Team
Mod Developer
Mar 11, 2014
3,924
1,289
253
Coolsquid, read all of this then tell me the greatness of Java
I read it. There's some I agree with, and some I don't. The rest I don't understand what's he talking about T_T

For iterators, if you don't want to implement hasNext(), you can throw a MethodNotSupportedException("Use next()") and do all of your stuff in the next() method.

Consturctors can call each other by using this.
Code:
class Foo {
    private final int bar;
    public Foo(int theBar) {
        bar = theBar;
    }
    public Foo() {
       this(1);
    }
}
Is valid

As for methods with the same names as consturctors, I can tell the different because of the return type.

For the section List Literals,
Code:
LinkedList<Integer> l = new LinkedList();

private void add(Integer... num) {
    for(Integer toAdd : num)
    l.add(toAdd);
  }
Would let you do
Code:
add(1,2,3,4,5,6,7);

... So how's the weather today?
It's cold and cloudy. Perfect weather for Oahu :D
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
I'd actually be OK with a separate "Coding Discussion" thread, if only to quiet all the people who want to use this thread to talk about other things...
CODE OPINIONS NEEDED. ON THE DOUBLE
Java is useful, but full of obnoxious and redundant syntax; Clojure seems cool, although I haven't messed with it yet aside from some cursory research; Perl is annoying; Ruby is OK; Python's procedural stuff is very good, but its object-orientation seems like it was cobbled together as an afterthought (unlike Java's, which the whole language was built around); Haskell is very useful and has an excellent tutorial, but strict static types and typeclasses can be annoying to debug on occasion (at least the compiler told me that I had to add Enum to all the functions that were supposed to accept any kind of number, so that helped, although the reports for other kinds of syntax errors are utterly useless); and I don't know a whole lot about C or C++ except that C++ has both procedural and object-oriented stuff going on at the same time, so it's like C and Java stacked on top of each other and can be really confusing.

Totally unrelated: It was actually warm where I am not for once today. It was warmer outside than in for the first time since, like, September.

Edit: Wow, you guys ninja'd me eleven times while I was writing that.
 

HeilMewTwo

New Member
Jul 29, 2019
1,179
-45
0
I'd actually be OK with a separate "Coding Discussion" thread, if only to quiet all the people who want to use this thread to talk about other things...

Java is useful, but full of obnoxious and redundant syntax; Clojure seems cool, although I haven't messed with it yet aside from some cursory research; Perl is annoying; Ruby is OK; Python's procedural stuff is very good, but its object-orientation seems like it was cobbled together as an afterthought (unlike Java's, which the whole language was built around); Haskell is very useful and has an excellent tutorial, but strict static types and typeclasses can be annoying to debug on occasion (at least the compiler told me that I had to add Enum to all the functions that were supposed to accept any kind of number, so that helped, although the reports for other kinds of syntax errors are utterly useless); and I don't know a whole lot about C or C++ except that C++ has both procedural and object-oriented stuff going on at the same time, so it's like C and Java stacked on top of each other and can be really confusing.

Totally unrelated: It was actually warm where I am not for once today. It was warmer outside than in for the first time since, like, September.
Though why are you commenting here? This is a place for werewolf players.
 

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
Consturctors can call each other by using this.
Code:
class Foo {
private final int bar;
public Foo(int theBar) {
bar = theBar;
There are problems with that, it is detailed in the article
[QUOTE="SoraZodia, post: 984635, member: 105965"]As for methods with the same names as consturctors, I can tell the different because of the return type.[/QUOTE]
Still not good practice
[QUOTE="SoraZodia, post: 984635, member: 105965"]For the section List Literals,
[CODE]LinkedList<Integer> l = new LinkedList();

private void add(Integer... num) {
for(Integer toAdd : num)
l.add(toAdd);
}
Would let you do
Code:
add(1,2,3,4,5,6,7);

}
public Foo() {
this(1);
}
}[/CODE]Is valid[/QUOTE]
List literals would still be a better option.
 

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
Java is useful, but full of obnoxious and redundant syntax; Clojure seems cool, although I haven't messed with it yet aside from some cursory research; Perl is annoying; Ruby is OK; Python's procedural stuff is very good, but its object-orientation seems like it was cobbled together as an afterthought (unlike Java's, which the whole language was built around); Haskell is very useful and has an excellent tutorial, but strict static types and typeclasses can be annoying to debug on occasion (at least the compiler told me that I had to add Enum to all the functions that were supposed to accept any kind of number, so that helped, although the reports for other kinds of syntax errors are utterly useless); and I don't know a whole lot about C or C++ except that C++ has both procedural and object-oriented stuff going on at the same time, so it's like C and Java stacked on top of each other and can be really confusing.
I like Perl for text manipulation and its many many libraries on CPAN. Hence why I used it for my irc bot
 

RJS

New Member
Jul 29, 2019
487
-2
0
y u do dis rjs?
Because this thread is as easy to read and follow for me as the scientific papers on basal ganglia function that I read at uni would most likely be for you. My response to all this code talk is "Wat?" and were I not on my phone and about to head off to bed, I'd supply an appropriate image :p