You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protocol buffers are not well supported in non-object-oriented languages popular in scientific computing, such as Fortran and IDL.
I disagree with the remark about Fortran being not object-oriented. Fortran (since 2003) supports derived-data-types (a.k.a data-abstraction) and type-bound-procedures (a.k.a methods that are invoked on the held data). This, of course, extends to other capabilities such as interfaces, inheritance, polymorphism, etc. Could the documentation be specific about what aspect of Fortran is incompatible with protocol-buffer, or atleast clarify the Fortran versions that are not supported, so that developers are not misinformed?
A simple example from chat-gpt:
module ShapesModule
type :: Shape
real:: area
contains
procedure :: calculateArea
end type Shape
containssubroutinecalculateArea(this)
class(Shape), intent(inout) :: this
! This is a generic method to calculate the area for different shapes
! Implement specific area calculations for each shape by overriding this method
this%area =0.0endsubroutine calculateArea
end module ShapesModule
program ObjectOrientedFortran
use ShapesModule
type :: CircleType
type(Shape) :: baseShape
real:: radius
end type CircleType
containssubroutinecalculateArea(this)
class(CircleType), intent(inout) :: this
this%baseShape%area = this%radius**2*3.14159endsubroutine calculateArea
type(CircleType) :: myCircle
myCircle%radius =5.0
! Calculate area using the overridden method for circles
call myCircle%baseShape%calculateArea()
! Print the calculated area
print*, "Area of the circle: ", myCircle%baseShape%area
end program ObjectOrientedFortran
The text was updated successfully, but these errors were encountered:
I will look into whether this information is outdated, or still applies. (It's possible that protobufs don't work well with Fortran even with its addition of some object oriented behaviors.)
https://protobuf.dev/overview/
Protocol buffers are not well supported in non-object-oriented languages popular in scientific computing, such as Fortran and IDL.
I disagree with the remark about Fortran being not object-oriented. Fortran (since 2003) supports derived-data-types (a.k.a data-abstraction) and type-bound-procedures (a.k.a methods that are invoked on the held data). This, of course, extends to other capabilities such as interfaces, inheritance, polymorphism, etc. Could the documentation be specific about what aspect of Fortran is incompatible with protocol-buffer, or atleast clarify the Fortran versions that are not supported, so that developers are not misinformed?
A simple example from chat-gpt:
The text was updated successfully, but these errors were encountered: