@RobertHarvey - I have a strange question for you. I pulled up my MSO question at home, and I'm able to see several of the comments that were deleted (including my own). How should I report that to SE? I have a screeenshot that I can share.
@ReutSharabani Python is duck typed. Generics aren't needed. You could potentially just return a Vertex and no one would care. But you probably wrote MyVertex for some reason.
@ReutSharabani Ideally the "Graph" class would use dependency injection so that arbitrary Vertex implementations can be used. But that can't be changed if you don't want to rewriite everything
@ReutSharabani You could pass graph a vertex factory when you create the graph (really amon already suggested this). But if someone else wrote Graph that might be problematic.
You can't resolve it statically like in Java though, because the language is dynamic. Otherwise it's the same effect.
@ReutSharabani I don't see why you would better off in Java if someone else wrote Graph and made no provision for creating subclasses of Vertex though.
Maybe that's just likely to happen, since they would probably use generics.
@MichaelT That's an interesting perspective. Perhaps it goes hand-in-hand with the idea that if large companies don't pay attention to the software component of their business, then they will soon be overwhelmed and erased due to swifter, more intelligent competitors.
@GlenH7 I hope this is an outlier.
2 hours later…
user55340
5:26 AM
@JimG. For example, my previous employer - a regional (but very large within that region) retail company. They were still trying to come to terms (and still failing) that they were a software company too. Having POS software that was 1M lines of java and another 250k lines of Progress. 40x internal web applications. 3d visualization of construction tools (foundations, steps, landscaping), home grown online web site, all the inventory control that goes with 300 large stores. Warehouse automation. Countertop design and fabrication automation.... the list goes on. Thats in a retail company.
@GlenH7 I'm afraid you won't get 5/5. maple is taking a short break. He recently spawned a new process, and maple_shaft 2.0 requires all his focus right now.
6 hours later…
user41796
2:02 PM
@JimG. I still think that was a troll. It was crafted "just right" in order to stay under the radar of immediate deletion but still inflammatory enough to attract rebuke. Trolls feed off of the discord.
user41796
@YannisRizos Thanks for the head's up. I kind of figured that would be the case. Spawnings take up a lot of time. I also noticed he's not super-active on MSO either, so I figured that was a second strike against my quest.
user41796
@WorldEngineer still doesn't have an excuse though, and I fully expect him to weigh in with an answer that anchors the whole question. Sure, sure, he's job hunting. So that means he's got lots of time to come up with an ultra-crafty answer.
(I still get a chuckle out of my nephew (2.1 years old) with his rocket fork (from think geek) taking a LONG time to eat dinner because every item he puts on his fork he says "5 4 3 2 1 blastoff! woosh" Still, he ate it all.
@jozefg Congrats! You will summarily have no more time for our debauchery, seriously though congrats and have fun man!
I'm sure they didn't even have to think about anything other than how they would ensure you accepted the offer
2 hours later…
user41796
10:01 PM
@WorldEngineer Heretic, indeed! Thanks for the explanation on the migration target. I probably should have just said "somewhere else." And I'm still waiting on your MSO answer ….. ;-) Glad you're feeling better. Violence + illness == not good.
@jozefg Make sure to stop by the Harvard Bookstore known as the Coop. It's a 3 story Barnes and Noble. Also see how many of the authors of Cormen's Algorithms you can get to autograph your copy by the time you graduate.