Pages:
Author

Topic: Bitcoin source code is a giant mess - page 2. (Read 10759 times)

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
hero member
Activity: 490
Merit: 501
June 12, 2013, 01:55:56 PM
#76
Isn't this open source? anybody can rewrite the code in any language that they want.

It definitely *is* open source but not just *anybody* can rewrite the code - to do that you would need to understand not just the C++ language (which I don't think anyone here is arguing is easy itself) but also boost (a big library which I actually don't use) as well as the other libraries that are being used in the project.

Even the devs themselves missed the subtleties of BerkleyDB that led to the temporary "hard-fork".

In short - no-one is going to come up with a 100% compatible Bitcoin equivalent in another language without a *lot* of work (a point that has been argued in various other threads - the problem was that Satoshi wrote the spec *after* he wrote the code).


so, anyone with the time, the knowledge, and the desire can rewrite it in any language.  as for it being used. I don't see that being an issue. It doesn't mean that it can't be done.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
June 12, 2013, 01:17:48 PM
#75
Isn't this open source? anybody can rewrite the code in any language that they want.

It definitely *is* open source but not just *anybody* can rewrite the code - to do that you would need to understand not just the C++ language (which I don't think anyone here is arguing is easy itself) but also boost (a big library which I actually don't use) as well as the other libraries that are being used in the project.

Even the devs themselves missed the subtleties of BerkleyDB that led to the temporary "hard-fork".

In short - no-one is going to come up with a 100% compatible Bitcoin equivalent in another language without a *lot* of work (a point that has been argued in various other threads - the problem was that Satoshi wrote the spec *after* he wrote the code).
legendary
Activity: 1050
Merit: 1000
You are WRONG!
June 12, 2013, 01:17:27 PM
#74
Isn't this open source? anybody can rewrite the code in any language that they want.
... but the satoshi client is still official community approved and most well tested client, so nobody gonna use it unless rewrite is very good, or suits there specific needs.
hero member
Activity: 490
Merit: 501
June 12, 2013, 01:01:24 PM
#73
Isn't this open source? anybody can rewrite the code in any language that they want.
legendary
Activity: 1050
Merit: 1000
You are WRONG!
June 12, 2013, 01:01:10 PM
#72
+1 CIYAM. To add to your good and explanative post, we could add that the main *good* usage of goto in C is for error handling, or to rephrase : to compensate for the lack of ... exceptions. Exception handling being provided by C++, there's no good reason to use gotos in C++ anymore.
gotoes are directly dangerous in C++.
hf
member
Activity: 98
Merit: 10
there will be no fucking vegetables
June 12, 2013, 12:36:10 PM
#71
+1 CIYAM. To add to your good and explanative post, we could add that the main *good* usage of goto in C is for error handling, or to rephrase : to compensate for the lack of ... exceptions. Exception handling being provided by C++, there's no good reason to use gotos in C++ anymore.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
June 12, 2013, 11:50:22 AM
#70
I think goto's are fine, they are just unfashionable

but fast and handy.

In C they can indeed make sense - but in C++ they present problems that the language itself does *not* provide guarantees for (in regards to safe exception handling).

So in C++ "goto" really is a "no no" (for error handling as the "goto" in this topic was originally referring to you should just use a "throw").

The *only* reason that *goto* was not *dropped* as a keyword from C++ was to keep backwards compatibility as much as possible with C.

So "fast and handy" they maybe - but in C++ they are 100% *wrong* (as any exception handling would get *screwed* by the *goto* as the language does not cater for this situation).

It goes the same for "setjmp" and "longjmp" (guess most don't remember those) - they can also *not* be used safely in C++ apps.
legendary
Activity: 2632
Merit: 1023
June 12, 2013, 11:39:22 AM
#69
heretical as it is

I think goto's are fine, they are just unfashionable

but fast and handy.

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
June 12, 2013, 11:21:59 AM
#68
In case of bitcoin quality and performance is high because of high effort of highly capable people committed to it. It however does not have the right patterns and is not well readable.

So then I think that *fundamentally* what we are really looking at identifying is which are the *wrong* patterns and how they should be reworked and also how any *unreadable* code should be changed to make it more readable.

This would be a much more productive direction than just having a "language war" (which never gets anywhere that I've seen in following such things since using Usenet back in the early 90's).

(I also don't think that Bitcoin should be *exclusively* C++ as I do support the idea of eventually there being a Bitcoin protocol RFC type document that *could* be implemented in any decent language).
hero member
Activity: 836
Merit: 1030
bits of proof
June 12, 2013, 11:13:58 AM
#67
Whilst I am an advocate of C++ (and don't see any reason to change the language at all) I think in any case the importance is the choice of algorithms and design patterns not the language itself.

Any language that provides the correct semantics with reasonable enough performance and is readable should be acceptable.
+1

I do not hate C++.

I think that there are languages that better support good design patterns, readability, code quality and have a performance that is acceptable. That does not mean there would not be any C++ code that has the right patterns, readability and quality.

In case of bitcoin quality and performance is high because of high effort of highly capable people committed to it. It however does not have the right patterns and is not well readable.

hero member
Activity: 727
Merit: 500
Minimum Effort/Maximum effect
June 12, 2013, 11:04:06 AM
#66
I'm just asking, I wanted to try to learn a new language and build a Bitcoin clone with extra features that the language can provide, just extra features or flexibility.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
June 12, 2013, 10:56:07 AM
#65
Whilst I am an advocate of C++ (and don't see any reason to change the language at all) I think in any case the importance is the choice of algorithms and design patterns not the language itself.

Any language that provides the correct semantics with reasonable enough performance and is readable should be acceptable.

BTW - all the C++ haters should have a list of bugs that *crash* the bitcoin-qt client (and lose people BTC) - could we have a list please just so we have an idea of how *broken* it actually is?

(and if it is not broken then why are people arguing it *needs* to rewritten in another language?)
hero member
Activity: 630
Merit: 500
Bitgoblin
June 12, 2013, 10:33:20 AM
#64
Java was already a step forward.
SBROFL.

Java is a terrible step backward, it's a total mess, manages to overcomplicates everything both over modern+higher level languages, AND over C/C++ themselves.
hero member
Activity: 836
Merit: 1030
bits of proof
June 12, 2013, 10:05:45 AM
#63
Java was already a step forward.

The next time I would consider Scala as it runs on JVM is OOP and is functional.
hf
member
Activity: 98
Merit: 10
there will be no fucking vegetables
June 12, 2013, 10:05:08 AM
#62
Go.
hero member
Activity: 727
Merit: 500
Minimum Effort/Maximum effect
June 12, 2013, 09:52:57 AM
#61
So what would be the ideal programming language to build Bitcoins succesor?
hero member
Activity: 630
Merit: 500
Bitgoblin
June 12, 2013, 09:38:15 AM
#60
and of course functional programming is the way forward, not OOP.
so, you like functional programming, hence functional programming is the way to go, and everyone else is doing it wrong.

well thought... Roll Eyes
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
June 11, 2013, 08:56:09 PM
#59
C++ sucks.

People who repeatedly type C++ sucks *suck*. Smiley
sr. member
Activity: 406
Merit: 250
LTC
June 11, 2013, 06:40:01 PM
#58
Guys, how many extra hashes you will get programming oo? None notices the irony of things? Indeed, BTC was designed for PC, but "surprise", FPGAs and ASIC too control over it, hashes are today produced with very low level hardware, quite the oposite of "OO"..
lolwut.

we're not talking about miners here.
Stupid me, didn't notice this is poetry thread, just looked over OP and saw some BTC related code.. Cheesy

Dude, no patronizing intention, but you always are under scrutinize of miners here., They move the thing around.. Smiley
Pages:
Jump to: