Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread via Digitalmars-d-learn
On Sunday, 20 November 2022 at 12:23:39 UTC, Ali Çehreli wrote: .. Hm. 'private' is about access control. It's unfortunate that phrase ('private') is used, both traditionally, and now (and yes, even by me). A much better, clearer term, would be: 'interaction control', since that is

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 20 November 2022 at 23:03:49 UTC, Adam D Ruppe wrote: Looking at doing it for mp3 is why I didn't put it in the interface yet... my mp3 code ported to D doesn't have a seek function! This is fixed on my computer now too, just need to check the rest of the bugs. So mp3 support will

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread via Digitalmars-d-learn
On Monday, 21 November 2022 at 00:29:12 UTC, thebluepandabear wrote: .. not to mention, I'd be out of job if I stopped writing getters/setters ;-) I value your input in this discussion, you have brought some good points. Out of interest, what type of industry-level software are you

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread TheZipCreator via Digitalmars-d-learn
On Sunday, 20 November 2022 at 23:03:49 UTC, Adam D Ruppe wrote: Here's the patch for ogg, you can download those two files off git master too works great! thanks

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread thebluepandabear via Digitalmars-d-learn
On Monday, 21 November 2022 at 00:29:12 UTC, thebluepandabear wrote: .. not to mention, I'd be out of job if I stopped writing getters/setters ;-) I value your input in this discussion, you have brought some good points. Out of interest, what type of industry-level software are you

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread thebluepandabear via Digitalmars-d-learn
.. not to mention, I'd be out of job if I stopped writing getters/setters ;-) I value your input in this discussion, you have brought some good points. Out of interest, what type of industry-level software are you creating with D? I don't know much companies using D commercially.

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread via Digitalmars-d-learn
On Sunday, 20 November 2022 at 12:23:39 UTC, Ali Çehreli wrote: Hm. 'private' is about access control. Encapsulation is something else. Ali "Clearly, encapsulation is not enough." https://www.infoworld.com/article/2075271/encapsulation-is-not-information-hiding.html

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread via Digitalmars-d-learn
On Sunday, 20 November 2022 at 23:04:18 UTC, Siarhei Siamashka wrote: .. BTW, many software developers and also wikipedia actually agree with [] () {} (): https://en.wikipedia.org/wiki/Encapsulation_(computer_programming) and.. Autostar C++, Misra C++, Cert C++ ... I could go on and on.

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread Siarhei Siamashka via Digitalmars-d-learn
On Sunday, 20 November 2022 at 12:23:39 UTC, Ali Çehreli wrote: On 11/20/22 00:31, [] () {} () wrote: > If anyone wants to learn more about why encapsulated types > (classes) have shown to be so useful in my many years of programming, Hm. 'private' is about access control. Encapsulation is

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 20 November 2022 at 20:23:28 UTC, TheZipCreator wrote: and it appears that arsd.simpleaudio doesn't have a seek function. Is there a way to do this via other means? I want something like: Here's the patch for ogg, you can download those two files off git master too (i can't tag

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 20 November 2022 at 22:26:26 UTC, TheZipCreator wrote: I guess in the meantime I'll just use a python script to cut the audio before execution i found the problem the library called seek(-thing) and my seek had a if(x <= 0) return; when it should have been if(x == 0) return. so

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread via Digitalmars-d-learn
On Sunday, 20 November 2022 at 12:23:39 UTC, Ali Çehreli wrote: On 11/20/22 00:31, [] () {} () wrote: > Quoted from that video (the one that you agree with): > > "I don't ever think that private .. private is like just .. shouldn't > even be used." > > "so I don't even use classes I just use

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread TheZipCreator via Digitalmars-d-learn
On Sunday, 20 November 2022 at 21:57:03 UTC, Adam D Ruppe wrote: On Sunday, 20 November 2022 at 20:34:44 UTC, Adam D Ruppe wrote: i'll get back to you in a lil i went overbudget lol. but yeah the seek function in the underlying lib fails and idk why it is so hard to even trace what error

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 20 November 2022 at 20:34:44 UTC, Adam D Ruppe wrote: i'll get back to you in a lil i went overbudget lol. but yeah the seek function in the underlying lib fails and idk why it is so hard to even trace what error actually happened in these C codebases

Re: Seeking in arsd.simpleaudio?

2022-11-20 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 20 November 2022 at 20:23:28 UTC, TheZipCreator wrote: so how would you implement this hypothetical `seek` function? (or if you could tell me a different library that already has this functionality that'd be great too) My underlying vorbis lib has it, but haven't added to the

Seeking in arsd.simpleaudio?

2022-11-20 Thread TheZipCreator via Digitalmars-d-learn
I'm currently making a library to do programmatic animation (akin to [manim](https://www.manim.community/) but for D and a different style) and for audio arsd.simpleaudio seems like the only real option (all the others I could find are too low-level for my taste) but if I want to skip to a

Re: "Little Scheme" and PL Design (Code Critique?)

2022-11-20 Thread jwatson-CO-edu via Digitalmars-d-learn
On Saturday, 19 November 2022 at 19:16:41 UTC, Jack Pope wrote: On Thursday, 17 November 2022 at 22:05:45 UTC, jwatson-CO-edu wrote: [`Atom`](https://github.com/jwatson-CO-edu/SPARROW/blob/main/lil_schemer.d#L66) (unit of data), I throw it on the heap and never bother to delete it. [...]

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread Ali Çehreli via Digitalmars-d-learn
On 11/20/22 00:31, [] () {} () wrote: > Quoted from that video (the one that you agree with): > > "I don't ever think that private .. private is like just .. shouldn't > even be used." > > "so I don't even use classes I just use struct so that everything is > always public .. and that in my

Re: Is defining get/set methods for every field overkill?

2022-11-20 Thread via Digitalmars-d-learn
On Saturday, 19 November 2022 at 19:40:43 UTC, Ali Çehreli wrote: .. (I fully agree with the posted video.) ... Quoted from that video (the one that you agree with): "I don't ever think that private .. private is like just .. shouldn't even be used." "so I don't even use classes I just