|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: On the quality and complexity of software within FRC
That's funny, because I always get the impression that the Java libraries were written by a C++ developer.
|
|
#2
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Pretty common in embedded environments.
|
|
#3
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
. For best results, assign someone good at Java to do the Java version and a C++ expert to do the C++ version. For "interesting" results asssign the Java guy to do the C++ and a C++ guy to Java.Anyway, here are a few of the reasons that the C++ looks like somebody wanted to write Java: -Pointers to stuff passed around without specific notes about ownership -Abstract base classes used like Java's interfaces in places where templates might be more appropirate -Virtual fuctions overused -Types that can't be used like normal C++ variables because they don't have copy or assignment operators the rule rather than the exception What C++isms do you see in the Java version? |
|
#4
|
|||||
|
|||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#5
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Whats also great about the WPILib is that whenever you initialize a digital port, delete it, and create a new one, the HAL leaks 6 bytes. Now since many teams don't do this, its not a big deal, but still, its a little odd that an official program has a memory leak, even if it is such a small rare one.
|
|
#6
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#7
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#8
|
|||
|
|||
|
Re: On the quality and complexity of software within FRC
Quote:
I've found that the WPI folks are very welcoming of patches... I'm sure a patch to add appropriate uninit functions to the HAL would be accepted in short order. |
|
#9
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
Talon t = new Talon(0); t.free(); t = new Talon(0); Leaks the memory. Because InitDigitalPort always returns a new digital port, instead of reusing an old one. At least on the java side. And t.free() does not actually release the digital port structure. I have a few bugs I plan on submitting to WPI that I have found. I do want to say thank you for doing the python port. I have been able to use that for some help as well, and am implementing the DotNet simulator to use a dictionary similar to the python one, and it should be directly compatible with the websim api. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|