Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 422 423 [424] 425 426 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 908521 times)

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6345 on: September 22, 2014, 11:14:13 pm »

This
Code: [Select]
int foo
has no meaning in Python.
ele
No shit, that's the point. Python has duck typing. Java doesn't. "int foo" means something in Java, and it's more precise and elegant.
That is entirely your opinion, btw.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Angle

  • Bay Watcher
  • 39 Indigo Spear Questions the Poor
    • View Profile
    • Agora Forum Demo!
Re: if self.isCoder(): post() #Programming Thread
« Reply #6346 on: September 22, 2014, 11:26:41 pm »

Summon the Java Crusaders! WE MUST DO BATTLE!
Logged

Agora: open-source platform to facilitate complicated discussions between large numbers of people. Now with test site!

The Temple of the Elements: Quirky Dungeon Crawler

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6347 on: September 23, 2014, 12:09:26 am »

I think static and dynamic typing both have their places. Right tools for right jobs and all. /unpopular_opinion
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6348 on: September 23, 2014, 12:34:33 am »

I think static and dynamic typing both have their places. Right tools for right jobs and all. /unpopular_opinion
WHAT DO YOU MEAN YOU'RE NOT ARBITRARILY PICKING A SIDE
Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6349 on: September 23, 2014, 12:36:08 am »

I'm... With Skyrunner on this one. Sure I have my preferences. But it's just -easier- to do things in some languages than others.

Unless you're talking about assembly. Assembly can do anything fight me irl

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6350 on: September 23, 2014, 12:38:07 am »

I'm... With Skyrunner on this one. Sure I have my preferences. But it's just -easier- to do things in some languages than others.

Unless you're talking about assembly. Assembly can do anything fight me irl
But can it explain why kids love Cinnamon Toast Crunch?
Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6351 on: September 23, 2014, 01:18:11 am »

Yes.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6355 on: September 23, 2014, 03:21:58 am »

don't do that, breaks stuff

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #6356 on: September 23, 2014, 05:21:14 am »

"Cthulhu"
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6357 on: September 23, 2014, 05:22:13 am »

Cthulhu likely code in COBOL.
Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #6358 on: September 23, 2014, 05:40:05 am »

Cthulhu wants annihilation, not eternal suffering.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6359 on: September 23, 2014, 09:29:26 am »

Code: [Select]
start

num firstOperand
num secondOperand
num myAnswer

input firstOperand
input secondOperand

call multiplyBot()
     myAnswer = firstOperand * secondOperand
     display myAnswer

end
Is this how modules work? It's just pseudo code, so I know there's no "right" way to do it, but is this logic functional? Does it make sense?

Task is to create a module that has two input parameters.
Not entirely sure if thisd be called a module, module is usually synonymous with library.
A function/method would be a better name. And youd want to define all your variables inside the function, and either get your input inside or pass it as an argument.

Youre also only defining a function and not actually calling it. Also, if that were Python, you wouldnt be able to access those variables since theyre defined outside the function.

E: You're doing something weird. Youre calling a function but then defining it there, which defeats the point of a function, which is to standardize code so you only have to change it in one place rather than in fifty different places.


I dont really like dynamic typing because I do most of my coding for tgstation, and replacing or renaming a variable, especially for base types or types with lots of children means you have to adjust it elsewhere. With dynamic typing, you'd have ro manually find said variable everywhere, but with static typing, the compiler tells you where you need to correct things.
« Last Edit: September 23, 2014, 09:39:13 am by miauw62 »
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.
Pages: 1 ... 422 423 [424] 425 426 ... 796